<?php ob_start();
    $make       = $this->listing->make;
    //$model      = Model_Listing_Attribute::one(array('_id' => $this->listing->model));
	$internal_lng = $this->listing->getInternalLanguage();
	$cat_search = $this->listing->category[0]->getParent();
?>
    <?php //echo empty($make->name) ? '' : $this->dtDd($this->t('Make', $internal_lng), $make->name)?>
    <?php //echo empty($model->name) ? '' : $this->dtDd($this->t('Model', $internal_lng), $model->name)?>
    <?php if (!empty($this->listing->make)) {
        $val = '<a href="/search/regular?small_category_list=' . $cat_search->path[0] . '&make=' . $make->_id . '">'. $make->name . "</a>";
        echo $this->dtDd($this->t('Make', $internal_lng), $val);
    }?>
    <?php if (!empty($this->listing->model)) {
    	$val = '<a href="/search/regular?small_category_list=' . $cat_search->path[0] . '&model=' . $model->_id . '">'. $model->name . "</a>";
        echo $this->dtDd($this->t('Model', $internal_lng), $val, true, ' itemprop="model"');
    }?>
    <?php
    if (!empty($this->listing->motorcycletype)) {
        $views = Model_Listing_Motorcycle::getMotorcycleType();
        echo $this->dtDd($this->t('Motorcycle Type', $internal_lng), $this->t($views[$this->listing->motorcycletype]));
    }
    ?>
    <?php 
	$views = Model_Listing_Motorcycle::getEngineMotor();
	echo empty($this->listing->yearmanufactured) ? '' : $this->dtDd($this->t('Year Manufactured', $internal_lng), $this->listing->yearmanufactured)?>    
    <?php echo empty($this->listing->numberpreviousowner) ? '' : $this->dtDd($this->t('Number of previous owners', $internal_lng), $this->listing->numberpreviousowner)?>

    <?php
    if (!empty($this->listing->exteriorcolor)) {
        /*$i=0;        $field='';
        foreach ($this->listing->exteriorcolor as $data) {
            if ($i==0) {
                $field.= $this->t($data); $i++;            }
            else {
                $field = $field.', '.$this->t($data);            }
        }echo $this->dtDd($this->t('Exterior Color', $internal_lng), $field); }*/
        $views = Model_Listing_Motorcycle::getExtColorPostAd();
        echo $this->dtDd($this->t('Exterior Color', $internal_lng), $this->t($views[$this->listing->exteriorcolor]));
    }
    ?>
    <?php
    if (!empty($this->listing->displacement)) {
        /*$i=0;        $field='';
        foreach ($this->listing->exteriorcolor as $data) {
            if ($i==0) {
                $field.= $this->t($data); $i++;            }
            else {
                $field = $field.', '.$this->t($data);            }
        }echo $this->dtDd($this->t('Exterior Color', $internal_lng), $field); }*/
        echo $this->dtDd($this->t('Displacement', $internal_lng), $this->t($this->listing->displacement));
    }
    ?>
    <?php
    if (!empty($this->listing->enginemotor)) {
        $views = Model_Listing_Motorcycle::getEngineMotor();
        echo $this->dtDd($this->t('Engine Motor', $internal_lng), $this->t($views[$this->listing->enginemotor]));
    }
    ?>
    <?php
    if (!empty($this->listing->transmission)) {
        $views = Model_Listing_Motorcycle::getTransmission();
        echo $this->dtDd($this->t('Transmission', $internal_lng), $this->t($views[$this->listing->transmission]));
    }
    ?>

    <?php //if (!empty($this->listing->enginemotor)) {echo $this->dtDd($this->t('Engine Motor'), $this->listing->enginemotor);}?>
    <?php //if (!empty($this->listing->transmission)) {echo $this->dtDd($this->t('Transmission'), $this->listing->transmission);}?>
    <?php if (!empty($this->listing->mileage)) {echo $this->dtDd($this->t('Mileage', $internal_lng), $this->listing->mileage.$this->t('Kilometers', $internal_lng));}?>
            
<?php $content = trim(ob_get_clean())?>
<?php if (!empty($content)):?>
<section class="category">
   
        <h3><?php echo $this->t('Motorcycle Information', $internal_lng)?></h3>
       <dl> 
            <?php echo $content ?>
        </dl>
    
</section>
<?php endif;?>
